<?xml version="1.0" encoding="utf-8"?>
<link:linkbase 
  xmlns:link="http://www.xbrl.org/2003/linkbase" 
  xmlns:generic="http://xbrl.org/2008/generic" 
  xmlns:va="http://xbrl.org/2008/assertion/value"
  xmlns:variable="http://xbrl.org/2008/variable" 
  xmlns:cf="http://xbrl.org/2008/filter/concept" 
  xmlns:uf="http://xbrl.org/2008/filter/unit"
  xmlns:xff="http://www.xbrl.org/2010/function/formula" 
  xmlns:label="http://xbrl.org/2008/label" 
  xmlns:eg="http://xbrl.org/formula/conformance/example" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xlink="http://www.w3.org/1999/xlink" 
  xsi:schemaLocation="
  http://www.xbrl.org/2003/linkbase
    http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd
  http://xbrl.org/2008/generic
    ../../core_schemas/generic-link.xsd 
  http://xbrl.org/2008/assertion/value
    ../../core_schemas/value-assertion.xsd
  http://xbrl.org/2008/variable
    ../../core_schemas/variable.xsd
  http://xbrl.org/2008/filter/concept
    ../../core_schemas/concept-filter.xsd
  http://xbrl.org/2008/filter/unit
    ../../core_schemas/unit-filter.xsd
  http://xbrl.org/2008/label
    ../../core_schemas/generic-label.xsd"
  >
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-set" xlink:href="../../core_schemas/variable.xsd#variable-set" xlink:type="simple"/>

  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-filter" xlink:href="../../core_schemas/variable.xsd#variable-filter" xlink:type="simple"/>  <link:roleRef roleURI="http://www.xbrl.org/2008/role/link" xlink:href="../../core_schemas/generic-link.xsd#standard-link-role" xlink:type="simple"/>

  <generic:link xlink:type="extended" xlink:role="http://www.xbrl.org/2008/role/link">

    <va:valueAssertion xlink:type="resource" xlink:label="assertion"
        test="
            empty( xff:uncovered-aspect('unit') )
        "
        id="assertion"
        aspectModel="non-dimensional" implicitFiltering="true" />
      
    <variable:factVariable xlink:type="resource" xlink:label="factvar1" 
      bindAsSequence="false"  />
    <cf:conceptName xlink:type="resource" xlink:label="filter1">
      <cf:concept>
        <cf:qname>eg:c1</cf:qname>
      </cf:concept>
    </cf:conceptName>
    <variable:variableArc xlink:type="arc" xlink:to="factvar1" xlink:from="assertion" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" order="1" 
      name="c1" />
    <variable:variableFilterArc xlink:type="arc" xlink:to="filter1" xlink:from="factvar1" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" order="1" complement="false" cover="true" />

    <variable:factVariable xlink:type="resource" xlink:label="factvar2" 
      bindAsSequence="false"  />
    <cf:conceptName xlink:type="resource" xlink:label="filter2">
      <cf:concept>
        <cf:qname>eg:n1</cf:qname>
      </cf:concept>
    </cf:conceptName>

    <!-- cover unit so it can implicitly filter to bind with string fact -->
    <uf:generalMeasures xlink:type="resource" xlink:label="filter2"
     test="true()" />
    
    <variable:variableArc xlink:type="arc" xlink:to="factvar2" xlink:from="assertion" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" order="1" 
      name="n1" />
    <variable:variableFilterArc xlink:type="arc" xlink:to="filter2" xlink:from="factvar2" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" order="1" complement="false" cover="true" />
  </generic:link>
</link:linkbase>
